package com.syh.jn.scm.infrastructure.repository.model.base;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 仓库
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "T_BASE_STOREHOUSE")
@EqualsAndHashCode(callSuper = true)
public class StorehouseModel extends SuperBusinessModel {
  /**
   * 仓库类型(1：实体仓库 2：逻辑仓库)
   */
  @Column(name = "TYPE", columnDefinition = "smallint COMMENT '仓库类型(1：实体仓库 2：逻辑仓库)'")
  private Short type;
  /**
   * 仓库用途(例如 良品仓库 或者 非良品仓库 或者 赠品仓库 字典设置)
   */
  @Column(name = "PURPOSE", columnDefinition = "smallint COMMENT '仓库用途(例如 良品仓库 或者 非良品仓库 或者 赠品仓库 字典设置)'")
  private Short purpose;

  /**
   * 状态:-1：停用 1：启用
   */
  @Column(name = "STATUS", columnDefinition = "smallint COMMENT '状态:-1：停用 1：启用'")
  private Short status;
  /**
   * 名称
   */
  @Column(name = "NAME", columnDefinition = "varchar(50) COMMENT '名称'")
  private String name;
  /**
   * 仓库编号
   */
  @Column(name = "CODE", columnDefinition = "varchar(50) COMMENT '仓库编号'")
  private String code;
  /**
   * 地址省 市 区
   */
  @Column(name = "AREA", columnDefinition = "varchar(300) COMMENT '地址省 市 区 使用[\"广东省\",\"广州市\",\"海珠区\"]格式保存'")
  private String area;
  /**
   * 仓库地址
   */
  @Column(name = "ADDRESS", columnDefinition = "varchar(300) COMMENT '仓库地址'")
  private String address;
  /**
   * 是否为直采直销仓 1：是
   */
  @Column(name = "IS_PERCHASE_TO_SALE", columnDefinition = "smallint COMMENT '是否为直采直销仓库: 1：是'")
  private Short isPerchaseToSale;
  /**
   * 操作人员id
   */
  @Column(name = "OPERATOR_ID", columnDefinition = "bigint COMMENT '录单人员id'")
  private Long operatorId;
  /**
   * 创建日期
   */
  @Column(name = "CREATE_TIME_STAMP", columnDefinition = "bigint COMMENT '创建日期'")
  private Long createTimeStamp;
  /**
   * 最后修改日期
   */
  @Column(name = "LAST_UPDATE_TIME_STAMP", columnDefinition = "bigint COMMENT '最后修改日期'")
  private Long lastUpdateTimeStamp;
}
